class Base {
    constructor(data, message) {//data json 类型 message字符串类型 如果data是字符串 message没传做个兼容
        if (typeof data === 'string') {
            this.message = data
            data = null
            message = null
        }
        if (data) {
            this.data = data
        }
        if (message) {
            this.message.message
        }
    }
}
class Success extends Base {
    constructor(data, message) {
        super(data, message)
        this.err = 0
    }
}
class Error extends Base {
    constructor(data, message) {
        super(data, message)
        this.err = -1
    }
}
module.exports = {
    Success, Error
}